﻿
CREATE VIEW [dbo].[exbug_RegistrulProiectelor]
AS
SELECT     'Ordonantare de plata' AS Den_Doc, o.NrDoc, o.DataDoc, o.Scop, p.NumePrenume, o.ValoareLei, o.DataVizaCFP, o.Achitat, o.MotivRefuz, o.VizatCFP, 
                      d.Nume AS departament, o.DocJust, o.CodUnitate
FROM         dbo.Ordonantari AS o LEFT OUTER JOIN
                      dbo.PersoaneVizaCFP AS p ON o.IDResponsabil = p.IDResponsabil LEFT OUTER JOIN
                      dbo.AngajatiSalarizare AS a ON a.IdPersoana = p.IDPersoana LEFT OUTER JOIN
                      dbo.Departamente AS d ON a.IDDepartament = d.IDDepartament